package main

import (
	"database/sql"
	"errors"
)

var (
	MAN   uint8 = 0
	WOMAN uint8 = 1
)

type UserInfoDB struct {
}

func (this *UserInfoDB) DBName() string {
	return "user_info"
}

/*
 * DB Insert Operation
 */
type InsertUserInfo struct {
	UserInfoDB
	uid  string
	name string
	age  uint8
	sex  uint8
}

func (this *InserUserInfo) Process(*sql.DB) {
}

/*
 * DB Select Operation
 */
type QueryUserInfo struct {
	UserInfoDB
	uid string
	ret chan map[string]string
}

func (this *QueryUserInfo) Process(*sql.DB) {
	result := make(map[string]string)
	// operate DB

	// return result
	ret <- result
}
